package com.pt5.pthouduan.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author ljx
 * @since 2025-04-14
 */
@TableName("user")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    private String username;

    private String password;

    private Integer userUpload;

    private Long userDownload;

    private Integer credit;

    private String image;

    private String sex;

    @TableId("userid")
    private Long userid;

    private Integer gradeId;

    private String passkey;

    private LocalDateTime userCreatedTime;

    private Double ratio;

    private Integer age;

    private Integer privacy;

    // 构造函数
    public User(Long id, String name) {
        this.userid = id;
        this.username = name;
    }



    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getUserUpload() {
        return userUpload;
    }

    public void setUserUpload(Integer userUpload) {
        this.userUpload = userUpload;
    }

    public Long getUserDownload() {
        return userDownload;
    }

    public void setUserDownload(Long userDownload) {
        this.userDownload = userDownload;
    }

    public Integer getCredit() {
        return credit;
    }

    public void setCredit(Integer credit) {
        this.credit = credit;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Long getUserid() {
        return userid;
    }

    public void setUserid(Long userid) {
        this.userid = userid;
    }

    public Integer getGradeId() {
        return gradeId;
    }

    public void setGradeId(Integer gradeId) {
        this.gradeId = gradeId;
    }

    public String getPasskey() {
        return passkey;
    }

    public void setPasskey(String passkey) {
        this.passkey = passkey;
    }

    public LocalDateTime getUserCreatedTime() {
        return userCreatedTime;
    }

    public void setUserCreatedTime(LocalDateTime userCreatedTime) {
        this.userCreatedTime = userCreatedTime;
    }

    public Double getRatio() {
        return ratio;
    }

    public void setRatio(Double ratio) {
        this.ratio = ratio;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getPrivacy() {
        return privacy;
    }

    public void setPrivacy(Integer privacy) {
        this.privacy = privacy;
    }

    @Override
    public String toString() {
        return "User{" +
        "username = " + username +
        ", password = " + password +
        ", userUpload = " + userUpload +
        ", userDownload = " + userDownload +
        ", credit = " + credit +
        ", image = " + image +
        ", sex = " + sex +
        ", userid = " + userid +
        ", gradeId = " + gradeId +
        ", passkey = " + passkey +
        ", userCreatedTime = " + userCreatedTime +
        ", ratio = " + ratio +
        ", age = " + age +
        ", privacy = " + privacy +
        "}";
    }
}
